package QianFeng08.CollectionDemo;

import java.util.Comparator;

public class CatComparator implements Comparator<Cat> {
    //选择 Id 进行排序
    @Override
    public int compare(Cat o1, Cat o2) {
        return o1.getId() - o2.getId();
    }
}
